package com.lucweb.service.impl;

import com.lucweb.dao.QuestionDao;
import com.lucweb.entity.TaskQuestion;
import com.lucweb.service.QuestionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("questionService")
public class QuestionServiceImpl implements QuestionService {
    



    @Resource
    private QuestionDao questionDao;


    

    @Override
    public List<TaskQuestion> getQuestion(String para) {

        return this.questionDao.getAllQuestion(para);

    }

    @Override
    public boolean addQuestion(TaskQuestion taskQuestion) {

        questionDao.addQuestion(taskQuestion);

        return true;
    }

    @Override
    public TaskQuestion getQuestionById(int questionId) {
        return this.questionDao.getQuestionById(questionId);
    }

    @Override
    public boolean deleteQuestion(int questionId) {
        questionDao.deleteQuestion(questionId);
        return true;
    }

    @Override
    public int getmaxId() {
        return this.questionDao.getMaxId();
    }
}
